<template>
  <div class="md-list">
    <div class="center">
      <span>智能卡号：</span>
      <span class="ct-number">{{ message.intelligentNo }}</span>
    </div>
    <div class="center">
      <span>有效期：</span>
      <span class="ct-number">{{ message.yxDate }}</span>
    </div>
    <div class="center">
      <span>状态：</span>
      <span class="ct-number">{{ message.status }}</span>
    </div>

    <div class="lst-fd" v-link="'/particulars/pay?intelligentNo=' + intelligentNo">
      <button type="button"><span>充值</span></button>
    </div>
  </div>
  <toast v-show="loading" :type="'loading'">加载中</toast>
  <dialog v-show="dialog" :title="'错误提示'" :type="" @weui-dialog-confirm="dialog=false">
    <p>加载失败，请重试</p>
  </dialog>
</template>
<script>
  import {Toast, Dialog} from "vue-weui";
  import {AJAX} from "../methods/query.js";
  export default {
    data() {
      return {
        intelligentNo: this.$route.query.intelligentNo,
        loading: false,
        dialog: false,
        message: {}
      };
    },
    async ready() {
      let getBossAcc = await AJAX.getBossAcc("intelligentNo=" + this.intelligentNo);
      this.message = getBossAcc;
      console.log(getBossAcc);
    },
    components: {
      Toast,
      Dialog
    }
  };
</script>
<style scoped lang="less">
  .md-list{
    position: absolute;
    width:100%;
    height: 100%;
    color:#404040;
    font-size: .8rem;
    background-color: #EBEBEB;
    .center{
      padding:.6rem .5rem;
      border-bottom: 1px solid #E6E6E6;
      background-color: #fff;
      position: relative;
      .ct-number{
        position: absolute;
        right:0;
        margin-right: .5rem;
      }
    }

    .lst-fd button{
      position: absolute;
      bottom: 0;
      padding: .5rem 0;
      width:90%;
      margin-left:5%;
      margin-bottom: .5rem;
      border-radius: .3rem;
      background-color: #15A1D6;
      text-align: center;
      color:#fff;
    }
  }
</style>
